package com.jacars.biz.user.dao.service;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.jacars.common.api.PageResult;
import com.jacars.common.api.Result;
import com.jacars.common.model.JsptRole;
import com.jacars.common.service.ISuperService;

import java.util.List;
import java.util.Map;

/**
 * @author zlt
 * <p>
 * Blog: https://zlt2000.gitee.io
 * Github: https://github.com/zlt2000
 */
public interface JsptRoleService extends ISuperService<JsptRole> {
    void saveRole(JsptRole jsptRole) throws Exception;

    void deleteRole(Long id);

    /**
     * 角色列表
     *
     * @param params
     * @return
     */
    PageResult<JsptRole> findRoles(Map<String, Object> params);

    /**
     * 新增或更新角色
     *
     * @param jsptRole
     * @return Result
     */
    Result saveOrUpdateRole(JsptRole jsptRole) throws Exception;

    /**
     * 查询所有角色
     *
     * @return
     */
    List<JsptRole> findAll();


    @InterceptorIgnore(tenantLine = "true")
    void saveTenantRole(JsptRole jsptRole);


}
